#!/usr/bin/env bash
# Updates weather forecast

ip r | while read Def _ IP _; do
	case $Def in
		default)
			ping -q -w 1 -c 1 "$IP" >/dev/null || exit

			break ;;
	esac
done

ansiweather -l Astrakhan -u metric -s true -f 1 -a false | cut -d' ' -f2,8-
